Conversation
마이페이지 API 구현 준비 단계로 S3 관련 설정을 추가한다. - @aws-sdk/client-s3, @aws-sdk/s3-request-presigner 의존성 추가 - s3.config.ts: S3 환경변수 로딩 (운영 시 bucket 필수, fail-fast) - app.module.ts: s3Config 로드 등록
마이페이지 기능에 필요한 Prisma 스키마 변경을 수행한다. - RecentProductView 신규 모델: 최근 본 상품 기록 (account+product unique, viewed_at) - ReviewImage → ReviewMedia 리네임: media_type(IMAGE/VIDEO) enum 추가, thumbnail_url 컬럼 추가 - Account, Product 모델에 역참조 추가 - soft-delete 미들웨어에 ReviewMedia, RecentProductView 등록
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d57d902e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ALTER TABLE `review_image` DROP FOREIGN KEY `review_image_review_id_fkey`; | ||
|
|
||
| -- DropTable | ||
| DROP TABLE `review_image`; |
There was a problem hiding this comment.
Migrate existing review_image rows before dropping table
This migration deletes review_image outright and then creates review_media, which permanently removes all existing review media records on any non-empty environment. Because prior deployments already store user content in review_image, applying this migration in production will cause immediate data loss unless the old rows are copied into review_media first (for example, mapping image_url to media_url with media_type='IMAGE') before the drop.
Useful? React with 👍 / 👎.
Summary
STAGE 0: S3 업로드 기반 환경 구성
@aws-sdk/client-s3,@aws-sdk/s3-request-presigner의존성 추가s3.config.ts: S3 환경변수 로딩 (운영 시AWS_S3_BUCKET필수, fail-fast)app.module.ts: s3Config 로드 등록STAGE 1: Prisma 스키마 변경
RecentProductView신규 테이블: 최근 본 상품 기록 (account+product unique, viewed_at 기준 정렬)ReviewImage→ReviewMedia확장:ReviewMediaTypeenum(IMAGE/VIDEO) 추가,thumbnail_url컬럼 추가ReviewMedia,RecentProductView등록Test plan
npx tsc --noEmit타입 체크 통과yarn test전체 387 테스트 통과prisma migrate dev마이그레이션 정상 적용 확인